package com.yonyougov.devops.cruxcisupport.appenvconfigitem;

import com.yonyougov.devops.fwc.core.dao.impl.BaseDaoImpl;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.util.HashMap;
import java.util.List;

/**
 * t_app_env_config_item数据层实现
 */
@Repository
public class AppEnvConfigItemDaoImpl extends BaseDaoImpl<AppEnvConfigItemEntity, BigInteger> implements AppEnvConfigItemDao {

    //<!--用户自定义代码开始-->
    private final SqlSessionTemplate sqlSessionTemplate;

    public AppEnvConfigItemDaoImpl(SqlSessionTemplate sqlSessionTemplate) {
        this.sqlSessionTemplate = sqlSessionTemplate;
    }

    @Override
    public void batchDelete(List<BigInteger> ids) {
        String statement = AppEnvConfigItemEntity.class.getName() + "Mapper.batchDeleteById";
        HashMap<Object, Object> map = new HashMap<>();
        map.put("ids", ids);
        sqlSessionTemplate.delete(statement, map);
    }
    //<!--用户自定义代码结束-->
}
